public class Main {
    public static void main(String[] args) {
        double loanAmount = 100; // 贷款总额（万元）
        int loanTerm = 12; // 贷款时间（月）
        double annualInterestRate = 5; // 年利率（例如：5%）

        LoanCalculator calculator = new LoanCalculator(loanAmount, loanTerm, annualInterestRate);

        double equalPrincipalInterest = calculator.calculateEqualPrincipalInterest();
        double equalPrincipalAndInterest = calculator.calculateEqualPrincipalAndInterest();

        System.out.println("等额本金还款法的总利息: " + equalPrincipalInterest + " 万元");
        System.out.println("等额本息还款法的总利息: " + equalPrincipalAndInterest + " 万元");
    }
}